projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3971ed1
)
flowbox: Be careful when the container is empty
author
Debarshi Ray
<debarshir@gnome.org>
Mon, 21 Oct 2013 14:21:11 +0000
(16:21 +0200)
committer
Debarshi Ray
<debarshir@gnome.org>
Mon, 21 Oct 2013 14:21:11 +0000
(16:21 +0200)
Otherwise, showing an empty GtkFlowBox will lead to:
GLib-CRITICAL **: g_sequence_get: assertion '!is_end (iter)' failed
gtk/gtkflowbox.c
patch
|
blob
|
history
diff --git
a/gtk/gtkflowbox.c
b/gtk/gtkflowbox.c
index e9c6367f40c1ea549fc15adcdfa6b59c090dd5ad..0bac89b3ae82086eac4e75a122a091a5baa6055e 100644
(file)
--- a/
gtk/gtkflowbox.c
+++ b/
gtk/gtkflowbox.c
@@
-1215,6
+1215,9
@@
gtk_flow_box_get_first_focusable (GtkFlowBox *box)
GtkFlowBoxChild *child;
iter = g_sequence_get_begin_iter (BOX_PRIV (box)->children);
+ if (g_sequence_iter_is_end (iter))
+ return NULL;
+
child = g_sequence_get (iter);
if (child_is_visible (GTK_WIDGET (child)) &&
gtk_widget_is_sensitive (GTK_WIDGET (child)))